from django.urls import re_path , path , include
from goods import views


urlpatterns = [
    # http://127.0.0.1:8000/list/115/1/
    re_path('^list/(?P<category_id>\d+)/(?P<page>\d+)/$' , views.GoodListView.as_view() , name='list'),
    # /hot/'+ this.category_id +'/'
    re_path('^hot/(?P<category_id>\d+)/$' , views.HotListView.as_view() , name='hot_list'),

    # 商品详情页
    re_path('^detail/(?P<sku_id>\d+)/$' , views.DetailView.as_view() , name='detail'),

    # 统计商品访问量
    re_path('^detail/visit/(?P<category_id>\d+)/$' , views.GoodVisitView.as_view()),

    path('search/' , views.search_view ,  name='search')

]